#ifndef TEMPLATE_LUA_H
#define TEMPLATE_LUA_H 1

#include "main.h"
#include "template.h"

#define LTMPL_NAME "lua"
#define LUA_TBLNAME "ncblog"


extern const tmpl_t lua_tpl;

int
lua_preinit(void);

int
lua_init(void);

int
lua_free(void);

int
lua_cleanup(void);

int
lua_setval(const tmpl_data_t *td, const char *key, const char *value);

const char *
lua_getval(const tmpl_data_t *td, const char *key);

tmpl_data_t *
lua_getptr(const char *filename);

string_t *
lua_result(const tmpl_data_t *td, string_t **str_ptr);

void
lua_request(const tmpl_data_t *td, const request_t *req);

int
lua_process(void);

#endif
